<div ng-controller="z-employee-c" z-loading is-loading="viewModel.isLoading">
	<div viewstack class="carousel slide" data-ride="carousel">
		<div class="carousel-inner" role="listbox">
			<div class="item active">
				<div class="row">
                    <div class="col-lg-12 heading">
                        <ul id="crumb" class="breadcrumb">
	                        <li>
		                        <i class="im-home"></i>
		                        <a href="index.html">首页</a>
	                        </li>
	                       <li ng-repeat="menu in viewModel.menuList">
	                        	<i class="{{menu.icons}}" ng-if="$index+1!=viewModel.menuList.length"></i>
	                        	<i class="en-arrow-right7" ng-if="$index+1==viewModel.menuList.length"></i>
	                        	{{menu.label}}
	                        </li>
                        </ul>
                    </div>
                </div>
                
				<div class="outlet">
	                <div class="panel-body">
	                	<form>
							<div class="row">
								<!-- 检索条件 -->
								<div class="col-xs-12 col-sm-10 col-md-11 form-box">
									<div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">公司：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group" style="width:272%;">
												<select id="eCorporation" multiple="multiple" class="form-control" ng-model="viewModel.corporationList" tabIndex="1">
				                                </select>	   
											</div>
										</div>
									</div>
									<div class="col-sm-6 col-md-4 col-lg-3 form-item">
									</div>
									<div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">部门：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group">
												<!-- <input name="department" 
													   ng-model="viewModel.departmentName" 
													   type="text" 
													   placeholder="部门编码、部门名称" 
													   maxLength="60"
													   class="form-control"
													   tabIndex="2"> -->
												<select id="eDepartmentName" multiple="multiple" class="form-control" ng-model="viewModel.departmentList" tabIndex="2">
				                                </select>	 
											</div>
										</div>
									</div>
									<div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">员工：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group">
												<!-- <input name="employeeNo" 
													   ng-model="viewModel.employeeNo" 
													   type="text" 
													   placeholder="员工号、中文名称、英文名称"
													   maxLength="45"
													   class="form-control"
													   tabIndex="3" > -->
												<textarea ng-model="viewModel.employeeNo" placeholder="员工号、中文名称、英文名称" class="form-control elastic __web-inspector-hide-shortcut__" rows="1"></textarea>
											</div>
										</div>
										<!-- <div class="col-sm-2 col-md-2 form-input">
											<div class="input-group">
												<button type="button" class="btn btn-success" tabIndex="7">批量</button>	 
											</div>	  
										</div> -->
									</div>
								</div>	
								<div class="col-xs-12 col-sm-10 col-md-11 form-box">	
									<div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">员工级别：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group">
				                                <select id="elevel" multiple="multiple" class="form-control" ng-model="viewModel.employeeLevelList" tabIndex="4">
				                                    <option value="13">13</option>
				                                    <option value="14">14</option>
				                                    <option value="15">15</option>
				                                    <option value="16">16</option>
				                                    <option value="17">17</option>
				                                    <option value="18">18</option>
				                                    <option value="19">19</option>
				                                    <option value="20">20</option>
				                                    <option value="21">21</option>
				                                    <option value="22">22</option>
				                                    <option value="23">23</option>
				                                    <option value="24">24</option>
				                                    <option value="25">25</option>
				                                    <option value="26">26</option>
				                                    <option value="27">27</option>
				                                    <option value="28">28</option>
				                                    <option value="29">29</option>
				                                    <option value="30">30</option>
				                                </select>
											</div>
										</div>
									</div>
									<div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">在职情况：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group">
												<select id="employeeIsSeparated" class="form-control" ng-model="viewModel.employeeIsSeparated" tabIndex="6">
				                                    <option value=""></option>
				                                    <option value="0">在职</option>
				                                    <option value="1">离职</option>
				                                </select>
											</div>
										</div>
									</div>
									<div class="col-sm-6 col-md-4 col-lg-3 form-item">
										  <div class="col-sm-5 col-md-5 form-title">基准日期：</div>
										   <div class="col-sm-7 col-md-7 form-input">
											<div class="input-group" ng-class="{ 'has-error' : editForm.effectiveDate.$dirty && editForm.effectiveDate.$invalid }">
												<input name="effectiveDate" 
													   ng-model="viewModel.effectiveDate" 
													   ng-change="viewModel.dateChange()"
													   class="form-control datetime-picker" 
													   type="text"
													   autofocus="autofocus" 
													   maxLength="10"
													   ng-click="viewModel.effectiveDateOpen($event)"
													   z-datepicker-popup="{{viewModel.format}}"
													   is-open="viewModel.effectiveDateOpnened"
													   datepicker-options="viewModel.dateOptions"
												       close-text="Close"
												       required
												       readonly>
												<span class="input-group-addon cursorPointer" ng-click="viewModel.effectiveDateOpen($event)"><i class="fa-calendar"></i></span>
											</div>
										   </div>
									    </div>
									    <div class="col-sm-6 col-md-4 col-lg-3 form-item">
										   <div class="col-sm-7 col-md-7 form-input-left">
												<button type="button" class="btn btn-success" ng-click="viewModel.rowCount=1;viewModel.bindData(1);" tabIndex="7">搜索</button>
				                            </div>
										</div>
								</div>
							</div>
						</form>
	                </div>
                </div>
                <div class="outlet outbon">
					<button class="btn btn-success" ng-click="viewModel.add()"  ng-click="!isShow" tabIndex="2">新增</button>
					<button class="btn btn-success" ng-click="viewEmployeeImportIsSeparatedModel.Load()" rabIndex="2">导入离职员工</button>
                </div>
				<div class="container-fluid">
					<div class="row">
						<!-- <table class="table table-striped  table-bordered table-hover"> -->
						<table class="table table-striped table-bordered" cellspacing="0" width="100%">
							<thead>
								<tr>
									<th><b>员工号</b></th>
									<th><b>中文名</b></th>
									<th><b>英文名</b></th>
									<th width="5%"><b>性别</b></th>
									<td width="6%"><b>员工类别</b></td>
									<td width="6%"><b>员工级别</b></td>
									<td><b>公司</b></td>
									<td><b>部门</b></td>
									<td><b>岗位</b></td>
									<td><b>在职情况</b></td>
									<td><b>离职日期</b></td>
									<td width="20%"><b>操作</b></td>
								</tr>
							</thead>
							<tbody>
								<tr ng-repeat="employee in viewModel.dataList">
									<td>{{employee.employeeNo}}</td>
									<td>{{employee.chineseName}}</td>
									<td>{{employee.englishName}}</td>
									<td ng-switch="employee.sex">
										<span ng-switch-when="1">男</span>
										<span ng-switch-when="2">女</span> 
									</td>
									<td ng-switch="employee.employeeType">
										<span ng-switch-when="1">正式</span>
										<span ng-switch-when="2">协力</span> 
										<span ng-switch-when="3">兼职</span>
										<span ng-switch-when="4">其他</span> 
									</td>
									<td>{{employee.level}}</td>
									<td>
										<span ng-if="employee.corporationCode!=null">({{employee.corporationCode}}){{employee.corporationName}}</span>
									</td>
									<td>
										<span ng-if="employee.departmentCode!=null">({{employee.departmentCode}}){{employee.departmentName}}</span>
									</td>
									<td>
										<span ng-if="employee.roleList!=null">
											<span ng-repeat="role in employee.roleList"><span ng-if="$index!=0"><br></span>({{role.roleCode}}){{role.roleName}}<span ng-if="role.isRole==1">(主)</span></span>
										</span>
									</td>
									<td ng-switch="employee.employeeIsSeparated">
										<span ng-switch-when="1">离职</span>
										<span ng-switch-when="0">在职</span> 
									</td>
									<td >{{employee.employeeSeparatedDate | date:'yyyy/MM/dd'}}</td>
									<td>
										<button type="button" 
												class="btn btn-primary btn-sm" 
												ng-disabled="employee.employeeIsSeparated!=0" 
												ng-click="viewModel.update(employee)">修改</button>
										<button type="button" 
												class="btn btn-danger btn-sm"
												ng-if="employee.employeeIsSeparated==0" 
												ng-disabled="employee.employeeIsSeparated!=0"
												ng-click="viewSeparatedModel.load(employee)">离职</button>
										<button type="button" 
												class="btn btn-primary btn-sm" 
												ng-if="employee.employeeIsSeparated==1"
												ng-click="viewRevocationdModel.save(employee)">复职</button>
										<button type="button" 
												class="btn btn-warning btn-sm" 
												ng-disabled="employee.employeeIsSeparated!=0"
												ng-click="viewModel.resetPassWord(employee)">重置密码</button>	
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="row">
						<div z-Pagination total-Data='viewModel.totalData'
							per-Page='viewModel.perPage'
							current-Page='viewModel.rowCount'
							on-Click="viewModel.bindData()"
							on-Change-Per-Page="viewModel.bindData()">
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<z-Dialog show-Save-Btn="true" 
		have-Error-Class="true" 
		load-Url="static/html/employee/employeeEdit.html" 
		title="{{editModel.title}}" 
		show="viewModel.show"
		cancel-fn="viewModel.unLoad()"
		save-fn="viewModel.save()"
		body-Height="500"></z-Dialog>
	<z-Dialog show-Save-Btn="false" 
		have-Error-Class="false" 
		load-Url="static/html/employee/selectCorporation.html" 
		title="{{viewCorporationModel.title}}" 
		show="viewSelectCorporationModel.show"
		cancel-fn="viewSelecCorporationModel.unLoad()"></z-Dialog>
	<z-Dialog show-Save-Btn="false" 
		have-Error-Class="false" 
		load-Url="static/html/employee/selectDepartment.html" 
		title="{{viewDepartmentModel.title}}" 
		show="viewSelectDepartmentModel.show"
		cancel-fn="viewSelecDepartmentModel.unLoad()"></z-Dialog>
	<z-Dialog show-Save-Btn="false" 
		have-Error-Class="false" 
		load-Url="static/html/employee/selectRole.html" 
		title="{{viewRoleModel.title}}" 
		show="viewSelectRoleModel.show"
		cancel-fn="viewSelecRoleModel.unLoad()"></z-Dialog>
	<z-Dialog show-Save-Btn="true" 
		have-Error-Class="false" 
		load-Url="static/html/employee/employeeIsSeparated.html" 
		title="离职设置" 
		show="viewSeparatedModel.show"
		cancel-fn="viewSeparatedModel.unLoad()"
		save-fn="viewSeparatedModel.save()"
		body-Height="130"></z-Dialog>
	<z-Dialog show-Save-Btn="false" 
	have-Error-Class="false"
		load-Url="static/html/employee/employeeImportIsSeparated.html"
		title="离职信息导入" 
		show="viewEmployeeImportIsSeparatedModel.show"
		cancel-fn="viewEmployeeImportIsSeparatedModel.unLoad()"
		save-fn="viewEmployeeImportIsSeparatedModel.save()" 
		body-Height="400"></z-Dialog>
</div>